# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-alembic
_pkgname=alembic
pkgver=1.4.2
pkgrel=2
pkgdesc='A database migration tool for SQLAlchemy.'
url='https://pypi.org/project/alembic/#files'
arch=('any')
license=('MIT')
depends=('python2' 'python2-sqlalchemy' 'python2-dateutil' 'python2-mako'
         'python2-editor')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('82bdfe442c19033aa2b802ec49edd13ed265c00a2b5a048490a83ffa8e53587c56a90b64d554e746a9189923419c528482cb7a7c950c210e0de47b32fa7c270e')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/$_pkgname" "$pkgdir/usr/bin/${_pkgname}2"
}

